//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//
//   PACKAGE : dcf
//   FILE    : UnboundNotificationMessage.java
//   CLASS   : UnboundNotificationMessage
//   DATE    : 2006-04-01
//   
//   DESCRIPTION
//   The UnboundNotificationMessage class is a message used to indicate that a remote endpoint is no longer
//   accessible, i.e., that the service is no longer associated to a remote endpoint.
//   
//
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//
//   Copyright (c) 2006 by Hal Smith
//
//   Permission is hereby granted, free of charge, to any person obtaining a copy of this source code 
//   (the "Code")to deal with the Code without restriction, including without limitation the rights to use, copy,
//   modify, merge, publish and distribute the Code, and to permit persons to whom the Code is furnished to do 
//   so, subject to the following conditions:
//
//   The above copyright notice and this permission notice shall be included in all copies or substantial 
//   portions of the Software.
//   
//
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//
//   VERSION HISTORY
//
//
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

package dcf;

public class UnboundNotificationMessage extends Message {
	
	// The name of the service that has become unbound.
	//
	private String serviceName;

	
	// Constructor.
	//
	// This operation initializes the UnboundNotificationMessage with the name of the service which has had 
	// an endpoint vanish. If the supplied service name is null the operation will log an error and throw
	// an InitializationException. There are no exceptions thrown by this operation.
	//
	public UnboundNotificationMessage(String initServiceName) throws InitializationException {
		
		// If either of the supplied parameters are null, log an error and throw an InitializationException.
		// Otherwise, save off the necessary data locally.
		//
		if (initServiceName == null) {
			
			System.out.println("UnboundNotificationMessage.UnboundNotificationMessage(initServiceName):");
			System.out.println("   Supplied service name cannot be null.");			
			
			throw new InitializationException();
			
		} else {
			
			serviceName = initServiceName;			
			
		}

	} // constructor
	
	
	// This operation returns the name of the service that has an endpoint become unbound. There are no 
	// exceptions thrown by this operation.
	//
	public String getServiceName() {
		
		return serviceName;
	
	} // getServiceName()

} // UnboundNotificationMessage

